﻿
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Word文件另存为HTML</title>
    <script type="text/javascript">
        function saveAsHTML() {
            var saveUrl = "/SaveAsHTML/SaveDoc";
            pageofficectrl.SaveFilePage = saveUrl;
            pageofficectrl.WebSaveAsHTML();
            alert("HTML格式的文件已经保存到服务器上。");
        }

        function OnPageOfficeCtrlInit() {
            pageofficectrl.AddCustomToolButton("另存HTML", "saveAsHTML()", 8);
        }

        function openHtml() {
            location.href = "doc/test.htm?r=" + Math.random();
        }

    </script>
</head>
<body style="overflow:hidden">
    <form id="form1">
        <div id="div1">
            执行另存HTML操作后，可<a href="javascript:openHtml();">查看HTML文件</a>效果
        </div>
        <div style=" width:auto; height:900px;">
            @Html.Raw(ViewBag.poCtrl)
        </div>
    </form>
</body>
</html>
